<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container-fluid">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <a class="brand" href="/">
                <img src="/images/logo.png" />
                Disputeo
            </a>
            <div class="nav-collapse">
                <?= $this->navigation()->menu() ?>
            </div>
            <form class="navbar-search pull-left" action="">
                <input class="search-query span2" type="text" placeholder="Search">
            </form>
            <?php if($this->session->username): ?>
            <ul class="nav pull-right">
                <li class="dropdown" id="username-menu">
                    <a href="#username-menu" class="dropdown-toggle" data-toggle="dropdown">
                        <?= $this->session->username ?>
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="#">Profile</a></li>
                        <li><a href="#">Settings</a></li>
                        <li><a href="#">History</a></li>
                    </ul>
                </li>
                <li>
                    <a href="/user/logout">Log Out</a>
                </li>
            </ul>
            <?php else: ?>
            <ul class="nav pull-right">
                <li class="divider-vertical"></li>
                <li <?= $this->path == '/user/login' ? 'class="active"' : '' ?>>
                    <a href="/user/login">Log In</a>
                </li>
                <li <?= $this->path == '/user/signup' ? 'class="active"' : '' ?>>
                    <a href="/user/signup">Sign Up</a>
                </li>
            </ul>
            <?php endif ?>
        </div>
    </div>
</div>